package com.usian;

import com.usian.pojo.SearchItem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "usian-search-service")
public interface SearchItemFeign {

    /**
     * 商品搜索
     * @param q
     * @param pageNum
     * @param pageSize
     * @return
     */
    @RequestMapping("list")
    public List<SearchItem> searchItemList(@RequestParam String q, @RequestParam Integer pageNum, @RequestParam  Integer pageSize);

    /**
     * 商品库导入索引库  mysql导入ES
     * @return
     */
    @RequestMapping("importAll")
    public Boolean importAll();

}
